Optimal. Leaf size=73 \[ -\frac{b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}+a^3 x-\frac{5 a b^2 \cot (c+d x)}{2 d}-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0469065, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3782, 3770, 3767, 8} \[ -\frac{b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}+a^3 x-\frac{5 a b^2 \cot (c+d x)}{2 d}-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3782
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (a+b \csc (c+d x))^3 \, dx &=-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac{1}{2} \int \left (2 a^3+b \left (6 a^2+b^2\right ) \csc (c+d x)+5 a b^2 \csc ^2(c+d x)\right ) \, dx\\ &=a^3 x-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac{1}{2} \left (5 a b^2\right ) \int \csc ^2(c+d x) \, dx+\frac{1}{2} \left (b \left (6 a^2+b^2\right )\right ) \int \csc (c+d x) \, dx\\ &=a^3 x-\frac{b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}-\frac{\left (5 a b^2\right ) \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{2 d}\\ &=a^3 x-\frac{b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{5 a b^2 \cot (c+d x)}{2 d}-\frac{b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}\\ \end{align*}
Mathematica [B] time = 0.648397, size = 152, normalized size = 2.08 \[ \frac{24 a^2 b \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )-24 a^2 b \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )+8 a^3 c+8 a^3 d x+12 a b^2 \tan \left (\frac{1}{2} (c+d x)\right )-12 a b^2 \cot \left (\frac{1}{2} (c+d x)\right )-b^3 \csc ^2\left (\frac{1}{2} (c+d x)\right )+b^3 \sec ^2\left (\frac{1}{2} (c+d x)\right )+4 b^3 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )-4 b^3 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.044, size = 99, normalized size = 1.4 \begin{align*}{a}^{3}x+{\frac{{a}^{3}c}{d}}+3\,{\frac{{a}^{2}b\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}}-3\,{\frac{a{b}^{2}\cot \left ( dx+c \right ) }{d}}-{\frac{{b}^{3}\csc \left ( dx+c \right ) \cot \left ( dx+c \right ) }{2\,d}}+{\frac{{b}^{3}\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00415, size = 128, normalized size = 1.75 \begin{align*} a^{3} x + \frac{b^{3}{\left (\frac{2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} - \frac{3 \, a^{2} b \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} - \frac{3 \, a b^{2}}{d \tan \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.510696, size = 383, normalized size = 5.25 \begin{align*} \frac{4 \, a^{3} d x \cos \left (d x + c\right )^{2} - 4 \, a^{3} d x + 12 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, b^{3} \cos \left (d x + c\right ) +{\left (6 \, a^{2} b + b^{3} -{\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) -{\left (6 \, a^{2} b + b^{3} -{\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \csc{\left (c + d x \right )}\right )^{3}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.47343, size = 181, normalized size = 2.48 \begin{align*} \frac{b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 8 \,{\left (d x + c\right )} a^{3} + 12 \, a b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 4 \,{\left (6 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - \frac{36 \, a^{2} b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 6 \, b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 12 \, a b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + b^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]